This disclosure relates generally to the field of graphics processing. More particularly, but not by way of limitation, this disclosure relates to having a graphics processor, such as a graphics processing unit (GPU), managing memory cache by tagging and dropping data set identifiers (DSIDs) associated with cache lines.
Computers, mobile devices, and other computing systems typically have at least one programmable processor, such as a central processing unit (CPU) and other programmable processors specialized for performing certain processes or functions (e.g., graphics processing). Examples of a programmable processor specialized to perform graphics processing operations include, but are not limited to, a GPU, a digital signal processor (DSP), a field programmable gate array (FPGA), and/or a CPU emulating a GPU. GPUs, in particular, comprise multiple execution cores (also referred to as shader cores) designed to execute the same instruction on parallel data streams, making them more effective than general-purpose processors for operations that process large blocks of data in parallel. For instance, a CPU functions as a host and hands-off specialized parallel tasks to the GPUs. Specifically, a CPU can execute an application stored in system memory that includes graphics data associated with a video frame. Rather than processing the graphics data, the CPU forwards the graphics data to the GPU for processing; thereby, freeing the CPU to perform other tasks concurrently with the GPU's processing of the graphics data.
GPU processing, such as render-to-texture passes, often write and read from memory cache to improve performance and power saving. For instance, a render-to-texture pass renders a frame to a texture resource that can be later re-passed to a shader for further processing. By doing so, the GPU could be writing to and/or reading from the texture resource before the GPU is done utilizing the texture resource. Having the texture resource accessible within memory cache during this time period could improve GPU performance. However, the memory cache may be unaware of when a GPU is done utilizing the texture resource. In certain instances, while the GPU is still using the texture resource, the memory cache may persist data out to system memory (e.g., DRAM) causing a reduction in GPU performance.